Skip to content

feat(wintertc): migrate structuredClone, queueMicrotask and timers from boa_runtime#5419

Open
KaustubhOG wants to merge 3 commits into
boa-dev:mainfrom
KaustubhOG:feat/wintertc-migrate-microtask
Open

feat(wintertc): migrate structuredClone, queueMicrotask and timers from boa_runtime#5419
KaustubhOG wants to merge 3 commits into
boa-dev:mainfrom
KaustubhOG:feat/wintertc-migrate-microtask

Conversation

@KaustubhOG

@KaustubhOG KaustubhOG commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Summary
Continues the boa_runtime -> boa_wintertc migration started with atob/btoa (#5418),moving three more modules with the same move + re-export pattern. Code lives only inboa_wintertc; boa_runtime re-exports it (public paths unchanged) and the *Extension structs delegate.

Changes

  • structuredClone: clone -> boa_wintertc::clone. Its store dependency (JsValueStore) also moves to boa_wintertc::store, since boa_wintertc cannot depend on boa_runtime. store stays public and is re-exported, so boa_runtime::message keeps compiling. rustc-hash moves with it.
  • queueMicrotask: microtask -> boa_wintertc::microtask.
  • timers: interval -> boa_wintertc::timers (renamed to its TC55 category). Re-exported as pub use boa_wintertc::timers as interval, so boa_runtime::interval (incl. clear_all, used by the WPT harness) is unchanged.

Notes / deviations

  • store is a non-TC55 helper that is now public in boa_wintertc. Net public surfac across both crates is unchanged (it was already public in boa_runtime); happy to make it pub(crate) once message also migrates.
  • The queueMicrotask unit test now records order in a global array instead of console,since console is still a stub in boa_wintertc.

@github-actions github-actions Bot added the Waiting On Review Waiting on reviews from the maintainers label Jul 1, 2026
@github-actions github-actions Bot added this to the v1.0.0 milestone Jul 1, 2026
@github-actions github-actions Bot added the C-Tests Issues and PRs related to the tests. label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Test262 conformance changes

Test result main count PR count difference
Total 53,125 53,125 0
Passed 51,072 51,072 0
Ignored 1,482 1,482 0
Failed 571 571 0
Panics 0 0 0
Conformance 96.14% 96.14% 0.00%

Tested main commit: 6ef5370c1cff770c51f3e4f8600590f11d66eeaf
Tested PR commit: a0ee7861b297566e5145babd40556a18da76506e
Compare commits: 6ef5370...a0ee786

Move the structuredClone implementation and its supporting JsValueStore
serialization core (the store module) from boa_runtime into boa_wintertc,
following the same move-and-re-export pattern used for atob/btoa (boa-dev#5418).

- core/runtime/src/clone and core/runtime/src/store are deleted; the code
  now lives only in boa_wintertc.
- boa_runtime re-exports both (pub use boa_wintertc::{clone, store}) so the
  public paths boa_runtime::clone and boa_runtime::store are unchanged, and
  boa_runtime::message keeps compiling against crate::store.
- StructuredCloneExtension delegates to boa_wintertc::clone::register.
- rustc-hash moves with store into boa_wintertc's dependencies; runtime keeps
  it because console still uses it.

store must be public in boa_wintertc so boa_runtime can re-export it for the
message module; net public surface across both crates is unchanged.
Move the queueMicrotask implementation from boa_runtime into boa_wintertc,
following the move-and-re-export pattern used for atob/btoa (boa-dev#5418).

- core/runtime/src/microtask is deleted; the code now lives only in
  boa_wintertc.
- boa_runtime re-exports it (pub use boa_wintertc::microtask) so the public
  path boa_runtime::microtask::register is unchanged.
- MicrotaskExtension delegates to boa_wintertc::microtask::register.

The unit test is rewritten to record execution order in a global array
rather than through console, since console is not part of boa_wintertc's
test surface (it is still a stub pending its own migration).
Move setTimeout/clearTimeout/setInterval/clearInterval from
boa_runtime::interval into boa_wintertc::timers, following the
move-and-re-export pattern used for atob/btoa (boa-dev#5418). The module is renamed
interval -> timers to match its TC55 category.

- core/runtime/src/interval.rs and its tests are deleted; the code now lives
  only in boa_wintertc::timers.
- boa_runtime re-exports it under the historical name
  (pub use boa_wintertc::timers as interval) so the public path
  boa_runtime::interval (used by e.g. the WPT harness's clear_all) and the
  register(context) signature are unchanged.
- TimeoutExtension delegates to boa_wintertc::timers::register.
- boa_wintertc mirrors boa_runtime's test-only
  allow(clippy::needless_raw_string_hashes); runtime's now-unused
  inspect_context_async test helper gains allow(unused).
@KaustubhOG
KaustubhOG force-pushed the feat/wintertc-migrate-microtask branch from 8e9d3f9 to a0ee786 Compare July 20, 2026 16:25
@github-actions github-actions Bot added C-Dependencies Pull requests that update a dependency file C-Runtime Issues and PRs related to Boa's runtime features labels Jul 20, 2026
@KaustubhOG KaustubhOG changed the title feat(wintertc): migrate queueMicrotask from boa_runtime feat(wintertc): migrate structuredClone, queueMicrotask and timers from boa_runtime Jul 20, 2026
@codecov

codecov Bot commented Jul 20, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.84211% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.69%. Comparing base (6ddc2b4) to head (a0ee786).
⚠️ Report is 993 commits behind head on main.

Files with missing lines Patch % Lines
core/wintertc/src/timers/mod.rs 97.46% 2 Missing ⚠️
core/wintertc/src/lib.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5419       +/-   ##
===========================================
+ Coverage   47.24%   62.69%   +15.45%     
===========================================
  Files         476      531       +55     
  Lines       46892    59073    +12181     
===========================================
+ Hits        22154    37036    +14882     
+ Misses      24738    22037     -2701     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@KaustubhOG
KaustubhOG marked this pull request as ready for review July 20, 2026 17:06
@KaustubhOG
KaustubhOG requested a review from a team as a code owner July 20, 2026 17:06
@KaustubhOG

Copy link
Copy Markdown
Contributor Author

hey @jedel1043 Batched three trivial move + re-export migrations here (structuredClone,
queueMicrotask, timers).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-Dependencies Pull requests that update a dependency file C-Runtime Issues and PRs related to Boa's runtime features C-Tests Issues and PRs related to the tests. Waiting On Review Waiting on reviews from the maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant